//
//  TalkfunCourseResource.h
//  CloudLive
//
//  Created by moruiwei on 16/11/4.
//  Copyright © 2016年 Talkfun. All rights reserved.
//

#import <Foundation/Foundation.h>

typedef NS_ENUM(NSInteger,TalkfunUploadStatus) {
    TalkfunUploadStatusPause  = 0,          //暂停
    TalkfunUploadStatusUpload = 1,          //上传
    TalkfunUploadStatusWait   = 2,           //等待上传
    TalkfunUploadStatusDone   = 3,          //上传完成
    TalkfunUploadStatusError  = 4           //上传错误
};

typedef NS_ENUM(NSInteger,TalkfunCourseResourceStatus) {
    
    TalkfunCourseResourceStatusNeverUpload  = 0 , //从没击过上传
    TalkfunCourseResourceStatusHadUpload    = 1   //点击过上传
};

typedef NS_ENUM(NSInteger,TalkfunProcessingStatus) {
    
    TalkfunProcessingStatusDefault                   =0,         //视频未处理
    TalkfunProcessingStatusVideoProcessing           =1,         //视频处理中
    TalkfunProcessingStatusVideoProcessingComplete   =2          //视频处理完成
};

// block
typedef void(^courseBlock)(NSArray* course);

@interface TalkfunCourseResource : NSObject


/*默认状态为YES   自动删除已经上传完成的课程*/
@property(nonatomic,assign)BOOL autoRemove;
/*课程数据 更新时回调*/
@property (nonatomic, strong) courseBlock  courseUpdateBlock;

/*单例*/
+ (id)shared;


/*读取  课程 列表*/
- (NSArray *)getCourseList;

/*上传  课程*/
-(void)uploadCourse:(NSString*)courseID;
//重新上传
- (void)re_upload:(NSString*)course_id;

/*删除  课程*/
-(void)removeCourse:(NSString*)courseID;

/* 暂停 课程*/
- (void)pauseCourse:(NSString*)courseID;

/*上传所有的课程*/
- (void)uploadAllCourses;

/* 暂停所有的课程*/
- (void)pauseAllCourses;

/* 是否有课程正在上传中 */
- (BOOL)isUploading;

@end
